using System;
using System.Collections.Generic;
using System.ByteBuffer;
using tools;

namespace Chat
{
    /// <summary>
    /// generate by msg tool
    /// 语音聊天
    /// </summary>
	public class ResVoiceChatMsg : ResMessage
	{
		//聊天的玩家
		public long playerId;
		//内容
		public String content;

        public ResVoiceChatMsg() { }

        public ResVoiceChatMsg(long playerId, String content)
        {
            this.playerId = playerId;
            this.content = content;
        }

        
		public void write(object obj)
		{
            ByteBuffer b = obj as ByteBuffer;
			b.PushLong(playerId);
			b.PushString(content);
			
		}

	    public void read(object obj)
		{
            MyConverter b = obj as MyConverter;
			playerId = b.toInt64();
			content = b.toString();
			
		}

		public int Id
		{
            get { return 102202; }
		}

        public String Desc
        {
            get { return "语音聊天"; }
        }
	}
}